package com.link2room.ironhide.controller.api;

import com.link2room.common.dto.result.base.BaseResultDto;
import com.link2room.common.dto.param.base.BaseL2rParamDto;
import com.link2room.common.jpa.result.QueryResult;
import com.link2room.ironhide.dto.result.base.L2RGroupBrandDto;
import com.link2room.ironhide.facade.IGroupBrandFacadeService;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * Created by sss on 2016/10/11.
 */
@Api(tags= "集团品牌")
@RestController
@RequestMapping("/api/GroupBrands")
public class GroupBrandApiController {
    @Resource
    private IGroupBrandFacadeService groupBrandFacadeService;

    @RequestMapping(method = RequestMethod.GET)
    public BaseResultDto groupBrands() throws Exception {
        BaseL2rParamDto baseL2rParamDto =new BaseL2rParamDto();
        QueryResult<L2RGroupBrandDto> l2RGroupBrandResult = groupBrandFacadeService.listL2RGroupBrand(baseL2rParamDto);
        BaseResultDto l2rRs=new BaseResultDto();
        l2rRs.setResultCode(0);
        l2rRs.setQueryResult(l2RGroupBrandResult);
        return l2rRs;
    }
}
